﻿using System;
using System.Collections.Generic;
using System.Threading;
using System.Text;
using NClassifier.Bayesian;

namespace NClassifier
{
    static class Program
    {


        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Bayesian.BayesianClassifier c = new 
                NClassifier.Bayesian.BayesianClassifier(new SqlWordsDataSource
                    (new SqlConnectionManager(
                        "Data Source=ROEY1;Initial Catalog=KnowFirst;Integrated Security=True")));
            
            c.TeachMatch("Positive", "מדהים");
            c.TeachMatch("Positive", "נחמד");
            c.TeachMatch("Positive", "מרענן");
            c.TeachMatch("Positive", "יפה");
            c.TeachMatch("Positive", "מעולה");
            c.TeachMatch("Positive", "כל הכבוד");
            c.TeachMatch("Positive", "טוב מאוד");
            c.TeachMatch("Positive", "מגניב");
            c.TeachMatch("Positive", "טוב");
            c.TeachMatch("Positive", "משהו משהו");
           

            c.TeachNonMatch("Positive", "גרוע");
            c.TeachNonMatch("Positive", "רע");
            c.TeachNonMatch("Positive", "מגעיל");
            c.TeachNonMatch("Positive", "על הפנים");
            c.TeachNonMatch("Positive", "לא משהו");
            c.TeachNonMatch("Positive", "מעצבן");
            c.TeachNonMatch("Positive", "גרוע");
            c.TeachNonMatch("Positive", "לא יפה");

            c.TeachNonMatch("Negative", "מדהים");
            c.TeachNonMatch("Negative", "נחמד");
            c.TeachNonMatch("Negative", "מרענן");
            c.TeachNonMatch("Negative", "יפה");
            c.TeachNonMatch("Negative", "מעולה");
            c.TeachNonMatch("Negative", "כל הכבוד");
            c.TeachNonMatch("Negative", "טוב מאוד");
            c.TeachNonMatch("Negative", "מגניב");
            c.TeachNonMatch("Negative", "טוב");
            c.TeachNonMatch("Negative", "משהו משהו");


            c.TeachMatch("Negative", "גרוע");
            c.TeachMatch("Negative", "רע");
            c.TeachMatch("Negative", "מגעיל");
            c.TeachMatch("Negative", "על הפנים");
            c.TeachMatch("Negative", "לא משהו");
            c.TeachMatch("Negative", "מעצבן");
            c.TeachMatch("Negative", "גרוע");
            c.TeachMatch("Negative", "לא יפה");
            Console.WriteLine(c.Classify("Positive", " הסרט היה משהו משהו שראיתי  "));
            Console.Read();



        }
    }
}
